﻿using Abp.AutoMapper;
using Abp.Modules;
using HCD.Dict.Dtos;
using HCD.Hcd.Dtos;
using HCD.His.Dtos;
using HCD.Mdt.Dtos;
using HCD.User.Dtos;

namespace HCD
{
    [DependsOn(
        typeof(EnterpriseCoreModule),
        typeof(AbpAutoMapperModule))]
    public class EnterpriseApplicationModule : AbpModule
    {
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(typeof(EnterpriseApplicationModule).Assembly);
        }

        public override void PreInitialize()
        {
            Configuration.Modules.AbpAutoMapper().Configurators.Add(CustomDictMapper.CreateMappings);
            Configuration.Modules.AbpAutoMapper().Configurators.Add(CustomHcdMapper.CreateMappings);
            Configuration.Modules.AbpAutoMapper().Configurators.Add(CustomMdtMapper.CreateMappings);
            Configuration.Modules.AbpAutoMapper().Configurators.Add(CustomHisMapper.CreateMappings);
            Configuration.Modules.AbpAutoMapper().Configurators.Add(CustomUserMapper.CreateMappings);
        }
    }
}